#include <iostream>

using namespace std;

class Solution {
public:
    int compareVersion(string version1, string version2) {
        int version_1_index = 0;
        int version_2_index = 0;
        int version_1_num = 0;
        int version_2_num = 0;
        while (version_1_index < version1.length() || version_2_index < version2.length()) {
            version_1_num = 0;
            version_2_num = 0;
            while (version_1_index < version1.length() && version1[version_1_index] != '.') {
                version_1_num *= 10;
                version_1_num += version1[version_1_index] - '0';
                version_1_index++;
            }
            while (version_2_index < version2.length() && version2[version_2_index] != '.') {
                version_2_num *= 10;
                version_2_num += version2[version_2_index] - '0';
                version_2_index++;
            }
            if (version_1_num > version_2_num) {
                return 1;
            } else if (version_1_num < version_2_num) {
                return -1;
            }
            version_1_index++;
            version_2_index++;
        }
        if (version_1_num > version_2_num) {
            return 1;
        } else if (version_1_num < version_2_num) {
            return -1;
        } else {
            return 0;
        }
    }
};

int main() {
    string input1 = "7";
    string input2 = "7.5.3";
    Solution solution;
    int output = solution.compareVersion(input1, input2);
    cout << output << endl;
    return 1;
}

